projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4b73a0
)
(detect_coding): Don't overflow coding->carryover.
author
Kenichi Handa
<handa@m17n.org>
Thu, 19 Feb 2009 04:23:32 +0000
(
04:23
+0000)
committer
Kenichi Handa
<handa@m17n.org>
Thu, 19 Feb 2009 04:23:32 +0000
(
04:23
+0000)
src/coding.c
patch
|
blob
|
history
diff --git
a/src/coding.c
b/src/coding.c
index ec57467f0230bf1b3cd5ba3d262b2755069fadac..313e4021486ef023f0c08b1fdb86fea68bc264f9 100644
(file)
--- a/
src/coding.c
+++ b/
src/coding.c
@@
-6805,6
+6805,8
@@
decode_coding (coding)
coding->carryover. */
unsigned char *p = coding->carryover;
+ if (nbytes > sizeof coding->carryover)
+ nbytes = sizeof coding->carryover;
coding->carryover_bytes = nbytes;
while (nbytes-- > 0)
*p++ = *src++;